<template>
    <div class="search-song-Lists">
       <content-list :contentList="albumDatas"></content-list>
    </div>
</template>
<script>
import ContentList from '../ContentList';
import {getSongListOfLikeTitle} from '../../api/index';
import {mixin} from "../../mixins";
import {searchByname} from "../../api/food";

export default {
    name: 'search-song-lists',
    components:{
        ContentList
    },
    data(){
        return{
            albumDatas: []
        }
    },
    mounted(){
        this.getSearchList();
    },
    methods:{
        getSearchList(){
            if(!this.$route.query.keywords){
                this.notify('您输入的内容为空','warning')
            }else{
              this.albumDatas = JSON.parse(window.sessionStorage.getItem('foods'));
              console.log(this.albumDatas)
              if (this.albumDatas == null){
                this.notify('暂无该美食的内容','warning')
              }
              // searchByname(this.$route.query.keywords)
              //       .then(res =>{
              //           if(res.data.code == 200){
              //               this.albumDatas = res.data.code;
              //           }else{
              //               this.notify('暂无该美食的内容','warning')
              //           }
              //       })
            }
        }
    }
}
</script>

<style lang="scss" scoped>
@import '../../assets/css/search-song-lists.scss';
</style>
